package com.gree;

import com.gree.flowable.app.tools.utils.SpringContextUtil;
import com.thebeastshop.forest.springboot.annotation.ForestScan;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableResourceServer
//@EnableEurekaClient     // 在服务启动后自动注册到Eureka中

@EnableDiscoveryClient  // 服务发现~ 当然没什么实际用处
@ForestScan("com.gree.flowable.app.http")
@EnableSwagger2
public class FlowableApplication {
    private static final org.slf4j.Logger Logger = LoggerFactory.getLogger(FlowableApplication.class);
    public static void main(String[] args) {
        Logger.info("开始启动服务 ");
        ConfigurableApplicationContext app = SpringApplication.run(FlowableApplication.class, args);
        SpringContextUtil.setApplicationContext(app);
        Logger.info("完成启动服务 ");
    }
}
